/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function setMargin(img_id,imgContainer_id){
    
    var contHeight = $("#"+imgContainer_id).innerHeight();
    var height = $("#"+img_id).height();
    height = parseInt(height.replace("px", ""));
    contHeight = parseInt(contHeight.replace("px", ""));
    var margin = pareseInt((contHeight-height)/2);
    $("#"+img_id),attr("margin-top",margin+"px");
    $("#"+img_id),attr("margin-bottom",margin+"px");
}